//导入request.js请求工具
import request from "@/utils/request.js";

//提供调用登录接口的函数
export const adminLoginService = (loginData) => {
  const params = new URLSearchParams();
  for (let key in loginData) {
    params.append(key, loginData[key]);
  }
  return request.post("/admin/login", params);
};

export const getAdminInfoService = (username) => {
  return request.get(`/admin/findByUserName`, {
    params: { username },
  });
};
